import { Controller, Get, Post, Body, Patch, Param, Delete, Res, Query } from '@nestjs/common';
import { PreviewService } from './preview.service';
import { Response } from 'express';

@Controller('preview')
export class PreviewController {
  constructor(private readonly previewService: PreviewService) { }

  @Post('convert')
  async readPdf(@Query('filePath') filePath: string): Promise<string> {
    return this.previewService.readPdf(filePath);
  }
}
